<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<title>Validity - Options</title>
<style type="text/css">
	body {
		font-family: "Verdana";
	}
	fieldset {
		border:none;
	}
	span.help,
	div#about {
		display:block;
		font-size:0.8em;
	}
</style>
</head>
<body>
	<h1>Validity</h1>
	<form action="#">
		<fieldset>
			<p>
				<label>Hosts to automatically validate (seperate with a space)</label>
			</p>
			<input id="validateHosts" type="text" value="" />
			<p>
				<label>Custom Validator URL</label>
				<span class="help">This can be used to send validation requests to your own installation of the W3C Markup Validation Service.</span>
			</p>
			<input id="validator" type="text" value="" />
		</fieldset>
		<input id="save" type="button" value="Save" />
	</form>
	<div id="about">
		<p>
			Validity is &copy; 2009 Ian Renyard<br />
			Source code is available at <a href="http://code.google.com/p/validityextension/">http://code.google.com/p/validityextension/</a>.
		</p>
		<p>
			Address bar icons by Mark James - <a href="http://www.famfamfam.com/">www.famfamfam.com</a>
		</p>
	</div>
<script type="text/javascript">
	function savePrefs () {
		var hosts = document.getElementById("validateHosts").value,
			validator = document.getElementById("validator").value;
		localStorage["validateHosts"] = hosts;
		localStorage["validator"] = validator;
		window.close();
	}

	function loadPrefs () {
		document.getElementById("validateHosts").value = localStorage["validateHosts"] || "";
		document.getElementById("validator").value = localStorage["validator"] || "";
	}

	window.addEventListener("load", function () {
		loadPrefs();
	}, false);

	document.getElementById("save").addEventListener("click", function () {
		savePrefs();
		return false;
	}, false);
</script>
</body>
</html>